package cn.getech.data.development.constant;

import lombok.Getter;

@Getter
public enum SqlPressionParamType {

    EQ(0, "属于"),
    NOT_EQ(1, "不属于"),
    IN(2, "包含"),
    NOT_IN(3, "不包含"),
    NULL(4, "为空"),
    NOT_NULL(5, "非空"),
    STAET_IS(6, "开头是"),
    START_NOT(7, "开头不是"),
    END_IS(8, "结尾是"),
    END_NOT(9, "结尾不是");
    private int id;
    private String name;

    SqlPressionParamType(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public static SqlPressionParamType ObjOf(Integer status) {
        if (status == null) {
            return null;
        } else {
            for (SqlPressionParamType s : SqlPressionParamType.values()) {
                if (s.getId() == status) {
                    return s;
                }
            }
            return null;
        }
    }
}
